<extend name="Base/common"/>
<block name="head_css">
    <link rel="stylesheet" type="text/css" href="__CSS__/news.css"/>
</block>
<block name="body">
    <!--正文-->
    <div class="body" id="body">
        <div class="wrap">
            <!--面包屑-->
            <div class="box-crumbs">
                <div class="crumbs">
                    您的位置 :
                    <a href="/">首页</a> &gt;&gt;
                    <a href="{:U('Investment/index')}">风险防范</a> &gt;&gt;
                    <a href="javascript:void(0);" class="on">{$category_info.title}</a>
                </div>
                <b>风险防范</b>
                <span class="en">Investors risk prevention</span>
            </div>
        </div>
        <div class="wrap">
            <div class="lef_menu">
                <ul>
                    <volist name="category_list" id="val">
                    <li>
                        <a <if condition="$category_info['id'] eq $val['id']">class="on"</if>
                                 href="{:U('Investment/index',array('cate_id'=>$val['id']))}#body">{$val.title}</a>
                    </li>
                    </volist>
                </ul>
            </div>
            <div class="page_content">
                <div class="case_list">
                    <ul id="news_data">
                        <volist name="news_list['list']" id="val">
                        <li>
                            <div class="time">{$val.create_time|date="Y-m",###}<span>{$val.create_time|date="d",###}</span></div>
                            <div class="text">
                                {$val.title} <a href="{:U('Investment/detail',array('id'=>$val['id']))}#body">【详细查看】</a>
                                <p>{$val.description}</p>
                            </div>
                        </li>
                        </volist>

                    </ul>
                    <input type="hidden" name="p" value="{$news_list['p']}"/>
                    <div class="page">
                        <a href="javascript:void(0);" onclick="page_(-1);">&lt;&lt;上一页</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <a href="javascript:void(0);" onclick="page_(+1);">下一页&gt;&gt;</a>
                    </div>
                </div>

            </div>
        </div>
    </div>
</block>
<block name="footer_js">
    <script>
        function page_(i){
            var p=$("input[name='p']").val();
            p=parseInt(p)+parseInt(i);

            var cate_id="{$category_info['id']}";
            $.get("{:U('Investment/page')}",{p:p,cate_id:cate_id},function(data){
                         if(data){

                             var str="";
                             $.each(data.list,function(k,v){
                                 str+='<li>'+
                                         '<div class="time">'+ v.create_time1+'<span>'+ v.create_time2+'</span></div>'+
                                 '<div class="text">'+v.title+' <a href="/index.php?s=/Home/Investment/detail/id/'+ v.id+'.html#body">【详细查看】</a>'+
                                 '<p>'+ v.description+'</p>'+
                                 '</div>'+
                                 '</li>';
                             });

                             $("#news_data").html(str);
                             $("input[name='p']").val(data.p);
                         }
            });

        }
    </script>
</block>